#pragma once

#include "ScannerV0.h"
#include "IScanner.h"
#include "IAutomat.h"
#include "IBuffer.h"
#include "ISymtable.h"
#include "IStringTab.h"


class ScannerImpl : public ScannerV0, public IScanner
{
    IAutomat* automat;
    IBuffer* buffer;
    ISymtable* symtable;
    IStringTab* lexemFrac;
    bool isTokenFound;
    bool isStop;
    //size_t len;
    Token* token;

public:
    ScannerImpl(const char * const srcFile = "Programm.txt");
    ~ScannerImpl(void);

    //inherited from ScannerV0(aka Scanner)
    virtual Token* nextToken();
    virtual void freeToken(Token token);
    virtual Information lookup(Key key);//clgr selfmade

    //inherited from IScanner
    virtual void mkToken(TType type, long long value);
    virtual void ungetChar(int times = 1);
    virtual void stop();


};

